package com.jxpanda.spring.module.wechat.component.http.base.constant;

import com.jxpanda.spring.module.wechat.component.http.base.WechatApi;
import lombok.Getter;
import org.springframework.http.HttpMethod;

/**
 * 企业微信接口地址常量
 * @author Panda
 */
public final class CorpApi {

    /**
     * 获取企业微信accessToken的接口
     * 文档地址：<a href="https://developer.work.weixin.qq.com/document/path/91039">获取企业微信accessToken</a>
     */
    public static final WechatApi<?, ?, ?> GET_ACCESS_TOKEN = new WechatApi<>() {

        @Getter
        private final String url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken";

    };


    /**
     * 企业微信-发送消息
     * 文档地址：<a href="https://developer.work.weixin.qq.com/document/path/90236">企业微信-发送消息</a>
     */
    public static final WechatApi<?, ?, ?> SEND_MESSAGE = new WechatApi<>() {

        @Getter
        private final HttpMethod method = HttpMethod.POST;

        @Getter
        private final String url = "https://qyapi.weixin.qq.com/cgi-bin/message/send";

    };


}
